package com.longe.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProviderController {

    @RequestMapping("provider")
    public String provider(Integer id){
        if(id == 2){//这里为了模拟熔断器的状态。
            throw new RuntimeException("provider服务发生异常");
        }
        return "服务提供者......";
    }

    @RequestMapping("provider/two")
    public String providerTwo(){
        return "服务提供者......two";
    }
}